<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2017/6/9
 * Time: 10:12
 */

namespace Api\Base;
use Think\Controller;

class MainController extends Controller{
    public function _exit($data,$msg,$code){
       $output = array(
        'data' => $data, 
        'msg' => $msg,
        'code' => $code //成功与失败的代码，一般都是正数或者负数
        );
        exit(json_encode($output));
    }
}